package top.fkxuexi.blogapi.modules.auth.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.fkxuexi.blogapi.modules.auth.dao.SysRoleMenuDAO;
import top.fkxuexi.blogapi.modules.auth.entity.SysMenu;
import top.fkxuexi.blogapi.modules.auth.entity.SysRole;
import top.fkxuexi.blogapi.modules.auth.entity.SysRoleMenu;
import top.fkxuexi.blogapi.modules.auth.service.SysRoleMenuService;

import java.util.List;

/**
 * @Author blog.fkxuexi.top
 * @Gitee: https://gitee.com/smartwork/
 * @Descri: 角色资源表
 */
@Transactional
@Service
public class SysRoleMenuServiceImpl implements SysRoleMenuService {

    @Autowired
    private SysRoleMenuDAO sysRoleMenuDAO;

    /**
     * 依据用户的角色id来获取角色的菜单
     * @param roleList
     * @return
     */
    @Override
    public List<SysMenu> getRoleMenu(List<SysRole> roleList) {
        return sysRoleMenuDAO.getRoleMenu(roleList);
    }
}